#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>

//定义函数指针
typedef int (*addFun)(int , int);
typedef int (*subFun)(int , int);
typedef QWidget* (*rootWidget)();

typedef QObject*(*createHotRefreshDemoPluginInstance)();

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

// 前向声明插件类
class QTcpSocket;
class QString;

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

    QTcpSocket *socket;

    float edition;

    QWidget *ww;
    QWidget *ww2;

private:
    QByteArray accumulatedData;
    QString filename;
    void set_hot_refresh_demo_plugin();
    void set_hot_refresh_demo_plugin_2();

private slots:
    void on_pushButton_clicked();

    void on_pushButton_2_clicked();

    void ready_read();

private:
    Ui::Widget *ui;
};
#endif // WIDGET_H
